/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vale.sax.io;

import java.io.File;
import java.io.FileReader;
import vale.sax.SaxException;

public abstract class XmlFileReader {

    public static String[] read(File f) throws SaxException {
        FileReader reader = null;
        String read = "";
        try {
            reader = new FileReader(f);
            int i = -1;
            do {
                i = reader.read();
                if (i != -1) {
                    char c = (char) i;
                    read = read + String.valueOf(c);
                }
            } while (i != -1);
        } catch (Exception ex) {
            throw new SaxException(SaxException.FATAL_ERROR, ex);
        } finally {
            try {
                reader.close();
            } catch (Exception ex) {
                throw new SaxException(SaxException.FATAL_ERROR, ex);
            }
        }
        return XmlTokenizer.separar(read);
    }
}
